package com.ruoyi.stuinfo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stuinfo.mapper.StudentPunishmentsMapper;
import com.ruoyi.stuinfo.domain.StudentPunishments;
import com.ruoyi.stuinfo.service.IStudentPunishmentsService;

/**
 * 惩戒查询Service业务层处理
 *
 * @author zc
 * @date 2025-05-16
 */
@Service
public class StudentPunishmentsServiceImpl implements IStudentPunishmentsService
{
    @Autowired
    private StudentPunishmentsMapper studentPunishmentsMapper;

    /**
     * 查询惩戒查询
     *
     * @param punishmentId 惩戒查询主键
     * @return 惩戒查询
     */
    @Override
    public StudentPunishments selectStudentPunishmentsByPunishmentId(Long punishmentId)
    {
        return studentPunishmentsMapper.selectStudentPunishmentsByPunishmentId(punishmentId);
    }

    /**
     * 查询惩戒查询列表
     *
     * @param studentPunishments 惩戒查询
     * @return 惩戒查询
     */
    @Override
    public List<StudentPunishments> selectStudentPunishmentsList(StudentPunishments studentPunishments)
    {
        return studentPunishmentsMapper.selectStudentPunishmentsList(studentPunishments);
    }

    /**
     * 新增惩戒查询
     *
     * @param studentPunishments 惩戒查询
     * @return 结果
     */
    @Override
    public int insertStudentPunishments(StudentPunishments studentPunishments)
    {
        return studentPunishmentsMapper.insertStudentPunishments(studentPunishments);
    }

    /**
     * 修改惩戒查询
     *
     * @param studentPunishments 惩戒查询
     * @return 结果
     */
    @Override
    public int updateStudentPunishments(StudentPunishments studentPunishments)
    {
        return studentPunishmentsMapper.updateStudentPunishments(studentPunishments);
    }

    /**
     * 批量删除惩戒查询
     *
     * @param punishmentIds 需要删除的惩戒查询主键
     * @return 结果
     */
    @Override
    public int deleteStudentPunishmentsByPunishmentIds(Long[] punishmentIds)
    {
        return studentPunishmentsMapper.deleteStudentPunishmentsByPunishmentIds(punishmentIds);
    }

    /**
     * 删除惩戒查询信息
     *
     * @param punishmentId 惩戒查询主键
     * @return 结果
     */
    @Override
    public int deleteStudentPunishmentsByPunishmentId(Long punishmentId)
    {
        return studentPunishmentsMapper.deleteStudentPunishmentsByPunishmentId(punishmentId);
    }

    @Override
    public List<StudentPunishments> selectStudentPunishmentsList_student(String teacherId) {
        return studentPunishmentsMapper.selectStudentPunishmentsList_student(teacherId);
    }
}
